package com.yummy.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * 菜品口味关系表
 * @TableName dish_flavor
 */
public class DishFlavor implements Serializable {
    /**
     * 主键
     */
    @Id
    private Long id;

    /**
     * 菜品
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long dishId;

    /**
     * 口味名称
     */
    private String name;

    /**
     * 口味数据list
     */
    private String value;



    private static final long serialVersionUID = 1L;

    public DishFlavor() {
    }

    public DishFlavor(Long dishId, String name, String value) {
        this.dishId = dishId;
        this.name = name;
        this.value = value;
    }

    public DishFlavor(String name, String value) {
        this.name = name;
        this.value = value;
    }

    /**
     * 主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 菜品
     */
    public Long getDishId() {
        return dishId;
    }

    /**
     * 菜品
     */
    public void setDishId(Long dishId) {
        this.dishId = dishId;
    }

    /**
     * 口味名称
     */
    public String getName() {
        return name;
    }

    /**
     * 口味名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 口味数据list
     */
    public String getValue() {
        return value;
    }

    /**
     * 口味数据list
     */
    public void setValue(String value) {
        this.value = value;
    }


    @Override
    public String toString() {
        return "DishFlavor{" +
                "id=" + id +
                ", dishId=" + dishId +
                ", name='" + name + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}